package main

import (
	echo "echotest"
	"first"
	"fmt"
	"github.com/donnie4w/go-logger/logger"
	"third"
)

func logInit() {
	log_dir := "/var/log/"
	log_file := "hllyun.log"
	logger.SetConsole(false)
	logger.SetLevelFile(logger.INFO, log_dir, log_file)
	logger.SetLevelFile(logger.WARN, log_dir, log_file)
	logger.SetLevelFile(logger.ERROR, log_dir, log_file)
}

func main() {
	logInit()
	fmt.Print("hi")
	a := ",all"
	logger.Info("log test for writing in file----------")
	first.Sayhello(a)
	first.Ifelse()
	first.SwitchCase()
	fmt.Println(first.Test(1))
	first.Array()
	err1 := fmt.Errorf("%s\n", "A normal error.")
	fmt.Print(err1)

	// echo
	echo.EchoTest()

	ret := third.Saytired("tired!!!")
	fmt.Print(ret)
}
